package com.insta.library.metier;

import java.util.ArrayList;
import java.util.Date;
import java.util.Stack;

import com.insta.library.model.Book;
import com.insta.library.model.Borrow;
import com.insta.library.model.Subscriber;

public class LibraryManagement {

	private Stack<Book> books;
	private int borrowingDuration;
	
	private ArrayList<Borrow> borrowing = new ArrayList<>();
	
	public void addBook(Book newBook){
		this.books.add(newBook);
	}
	
	public void removeBook(Book oldBook){
		this.books.remove(oldBook);
	}
	
	public void borrowBook(Book book, Subscriber sub){
		Borrow b = new Borrow(sub, book, new Date(), null);
		this.borrowing.add(b);
	}
	
	public void returnBook(Book book, Subscriber sub){
		this.borrowing.remove(sub);
	}
}
